local skel = fk.CreateSkill {
  name = "rmt__taowan",
  tags = {Skill.Compulsory, Skill.Lord},
}

skel:addEffect(fk.PreCardEffect, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    if data.from == player and player:hasSkill(skel.name) and data.to then
      if data.to.kingdom == "zhao" and data.to:getHandcardNum() == data.to:getMaxCards() then
        event:setCostData(self, {tos = {data.to}})
        return true
      end
    end
  end,
  on_use = function (self, event, target, player, data)
    data.use.disresponsiveList = data.use.disresponsiveList or {}
    table.insertTableIfNeed(data.use.disresponsiveList, data.to)
    data.disresponsive = true
  end,
})

skel:addEffect("maxcards", {
  correct_func = function(self, player)
    if player.kingdom == "zhao" then
      return #table.filter(Fk:currentRoom().alive_players, function (p)
        return p:hasSkill(skel.name)
      end)
    end
  end,
})

Fk:loadTranslationTable{
  ["rmt__taowan"] = "梼腕",
  [":rmt__taowan"] = "​主公技，锁定技，赵势力角色的手牌上限+1；手牌数等于手牌上限的赵势力角色不能响应你使用的牌。",

  ["$rmt__taowan1"] = "王室多难，四海业重，勉从推逼以副天人之望！",
  ["$rmt__taowan2"] = "皇帝之号非敢所闻，且可称大赵天王！",
}

return skel
